home *** CD-ROM | disk | FTP | other *** search
/ Game Programming in C++ - Start to Finish / GameProgrammingS.iso / developer_install / CEGUISDK-0.4.1-VC6-Native.exe / {app} / include / elements / CEGUIMultiColumnListProperties.h < prev    next >
Encoding:
C/C++ Source or Header  |  2005-07-21  |  9.6 KB  |  363 lines

  1. /************************************************************************
  2.     filename:     CEGUIMultiColumnListProperties.h
  3.     created:    11/7/2004
  4.     author:        Paul D Turner
  5.     
  6.     purpose:    Interface to multi-column list properties.
  7. *************************************************************************/
  8. /*************************************************************************
  9.     Crazy Eddie's GUI System (http://www.cegui.org.uk)
  10.     Copyright (C)2004 - 2005 Paul D Turner (paul@cegui.org.uk)
  11.  
  12.     This library is free software; you can redistribute it and/or
  13.     modify it under the terms of the GNU Lesser General Public
  14.     License as published by the Free Software Foundation; either
  15.     version 2.1 of the License, or (at your option) any later version.
  16.  
  17.     This library is distributed in the hope that it will be useful,
  18.     but WITHOUT ANY WARRANTY; without even the implied warranty of
  19.     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  20.     Lesser General Public License for more details.
  21.  
  22.     You should have received a copy of the GNU Lesser General Public
  23.     License along with this library; if not, write to the Free Software
  24.     Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  25. *************************************************************************/
  26. #ifndef _CEGUIMultiColumnListProperties_h_
  27. #define _CEGUIMultiColumnListProperties_h_
  28.  
  29. #include "CEGUIProperty.h"
  30.  
  31.  
  32. // Start of CEGUI namespace section
  33. namespace CEGUI
  34. {
  35.  
  36. // Start of MultiColumnListProperties namespace section
  37. /*!
  38. \brief
  39.     Namespace containing all classes that make up the properties interface for the MultiColumnList class
  40. */
  41. namespace MultiColumnListProperties
  42. {
  43. /*!
  44. \brief
  45.     Property to access the setting for user sizing of the column headers.
  46.  
  47.     \par Usage:
  48.         - Name: ColumnsSizable
  49.         - Format: "[text]"
  50.  
  51.     \par Where [Text] is:
  52.         - "True" to indicate the column headers can be sized by the user.
  53.         - "False" to indicate the column headers can not be sized by the user.
  54. */
  55. class ColumnsSizable : public Property
  56. {
  57. public:
  58.     ColumnsSizable() : Property(
  59.         "ColumnsSizable",
  60.         "Property to get/set the setting for user sizing of the column headers.  Value is either \"True\" or \"False\".",
  61.         "True")
  62.     {}
  63.  
  64.     String    get(const PropertyReceiver* receiver) const;
  65.     void    set(PropertyReceiver* receiver, const String& value);
  66. };
  67.  
  68.  
  69. /*!
  70. \brief
  71.     Property to access the setting for user moving of the column headers.
  72.  
  73.     \par Usage:
  74.         - Name: ColumnsMovable
  75.         - Format: "[text]"
  76.  
  77.     \par Where [Text] is:
  78.         - "True" to indicate the column headers can be moved by the user.
  79.         - "False" to indicate the column headers can not be moved by the user.
  80. */
  81. class ColumnsMovable : public Property
  82. {
  83. public:
  84.     ColumnsMovable() : Property(
  85.         "ColumnsMovable",
  86.         "Property to get/set the setting for user moving of the column headers.  Value is either \"True\" or \"False\".",
  87.         "True")
  88.     {}
  89.  
  90.     String    get(const PropertyReceiver* receiver) const;
  91.     void    set(PropertyReceiver* receiver, const String& value);
  92. };
  93.  
  94.  
  95. /*!
  96. \brief
  97.     Property to access the setting for user modification of the sort column & direction.
  98.  
  99.     \par Usage:
  100.         - Name: SortSettingEnabled
  101.         - Format: "[text]"
  102.  
  103.     \par Where [Text] is:
  104.         - "True" to indicate the user may modify the sort column and direction by clicking the header segments.
  105.         - "False" to indicate the user may not modify the sort column or direction.
  106. */
  107. class SortSettingEnabled : public Property
  108. {
  109. public:
  110.     SortSettingEnabled() : Property(
  111.         "SortSettingEnabled",
  112.         "Property to get/set the setting for for user modification of the sort column & direction.  Value is either \"True\" or \"False\".",
  113.         "True")
  114.     {}
  115.  
  116.     String    get(const PropertyReceiver* receiver) const;
  117.     void    set(PropertyReceiver* receiver, const String& value);
  118. };
  119.  
  120.  
  121. /*!
  122. \brief
  123.     Property to access the sort direction setting of the list.
  124.  
  125.     \par Usage:
  126.         - Name: SortDirection
  127.         - Format: "[text]"
  128.  
  129.     \par Where [Text] is one of:
  130.         - "Ascending"
  131.         - "Descending"
  132.         - "None"
  133. */
  134. class SortDirection : public Property
  135. {
  136. public:
  137.     SortDirection() : Property(
  138.         "SortDirection",
  139.         "Property to get/set the sort direction setting of the list.  Value is the text of one of the SortDirection enumerated value names.",
  140.         "None")
  141.     {}
  142.  
  143.     String    get(const PropertyReceiver* receiver) const;
  144.     void    set(PropertyReceiver* receiver, const String& value);
  145. };
  146.  
  147.  
  148. /*!
  149. \brief
  150.     Property to access the current sort column (via ID code).
  151.  
  152.     \par Usage:
  153.         - Name: SortColumnID
  154.         - Format: "[uint]".
  155.  
  156.     \par Where:
  157.         - [uint] is any unsigned integer value.
  158. */
  159. class SortColumnID : public Property
  160. {
  161. public:
  162.     SortColumnID() : Property(
  163.         "SortColumnID",
  164.         "Property to get/set the current sort column (via ID code).  Value is an unsigned integer number.",
  165.         "0", false)
  166.     {}
  167.  
  168.     String    get(const PropertyReceiver* receiver) const;
  169.     void    set(PropertyReceiver* receiver, const String& value);
  170. };
  171.  
  172.  
  173. /*!
  174. \brief
  175.     Property to access the nominated selection column (via ID).
  176.  
  177.     \par Usage:
  178.         - Name: NominatedSelectionColumnID
  179.         - Format: "[uint]".
  180.  
  181.     \par Where:
  182.         - [uint] is any unsigned integer value representing the ID code of the column to be used.
  183. */
  184. class NominatedSelectionColumnID : public Property
  185. {
  186. public:
  187.     NominatedSelectionColumnID() : Property(
  188.         "NominatedSelectionColumnID",
  189.         "Property to get/set the nominated selection column (via ID).  Value is an unsigned integer number.",
  190.         "0")
  191.     {}
  192.  
  193.     String    get(const PropertyReceiver* receiver) const;
  194.     void    set(PropertyReceiver* receiver, const String& value);
  195. };
  196.  
  197.  
  198. /*!
  199. \brief
  200.     Property to access the nominated selection row.
  201.  
  202.     \par Usage:
  203.         - Name: NominatedSelectionRow
  204.         - Format: "[uint]".
  205.  
  206.     \par Where:
  207.         - [uint] is any unsigned integer value representing the index of the row to be used.
  208. */
  209. class NominatedSelectionRow : public Property
  210. {
  211. public:
  212.     NominatedSelectionRow() : Property(
  213.         "NominatedSelectionRow",
  214.         "Property to get/set the nominated selection row.  Value is an unsigned integer number.",
  215.         "0")
  216.     {}
  217.  
  218.     String    get(const PropertyReceiver* receiver) const;
  219.     void    set(PropertyReceiver* receiver, const String& value);
  220. };
  221.  
  222.  
  223. /*!
  224. \brief
  225.     Property to access the 'always show' setting for the vertical scroll bar of the list box.
  226.  
  227.     \par Usage:
  228.         - Name: ForceVertScrollbar
  229.         - Format: "[text]"
  230.  
  231.     \par Where [Text] is:
  232.         - "True" to indicate that the vertical scroll bar will always be shown.
  233.         - "False" to indicate that the vertical scroll bar will only be shown when it is needed.
  234. */
  235. class ForceVertScrollbar : public Property
  236. {
  237. public:
  238.     ForceVertScrollbar() : Property(
  239.         "ForceVertScrollbar",
  240.         "Property to get/set the 'always show' setting for the vertical scroll bar of the list box.  Value is either \"True\" or \"False\".",
  241.         "False")
  242.     {}
  243.  
  244.     String    get(const PropertyReceiver* receiver) const;
  245.     void    set(PropertyReceiver* receiver, const String& value);
  246. };
  247.  
  248.  
  249. /*!
  250. \brief
  251.     Property to access the 'always show' setting for the horizontal scroll bar of the list box.
  252.  
  253.     \par Usage:
  254.         - Name: ForceHorzScrollbar
  255.         - Format: "[text]"
  256.  
  257.     \par Where [Text] is:
  258.         - "True" to indicate that the horizontal scroll bar will always be shown.
  259.         - "False" to indicate that the horizontal scroll bar will only be shown when it is needed.
  260. */
  261. class ForceHorzScrollbar : public Property
  262. {
  263. public:
  264.     ForceHorzScrollbar() : Property(
  265.         "ForceHorzScrollbar",
  266.         "Property to get/set the 'always show' setting for the horizontal scroll bar of the list box.  Value is either \"True\" or \"False\".",
  267.         "False")
  268.     {}
  269.  
  270.     String    get(const PropertyReceiver* receiver) const;
  271.     void    set(PropertyReceiver* receiver, const String& value);
  272. };
  273.  
  274.  
  275. /*!
  276. \brief
  277.     Property to access the selection mode setting of the list.
  278.  
  279.     \par Usage:
  280.         - Name: SelectionMode
  281.         - Format: "[text]"
  282.  
  283.     \par Where [Text] is one of:
  284.         - "RowSingle"
  285.         - "RowMultiple"
  286.         - "CellSingle"
  287.         - "CellMultiple"
  288.         - "NominatedColumnSingle"
  289.         - "NominatedColumnMultiple"
  290.         - "ColumnSingle"
  291.         - "ColumnMultiple"
  292.         - "NominatedRowSingle"
  293.         - "NominatedRowMultiple"
  294. */
  295. class SelectionMode : public Property
  296. {
  297. public:
  298.     SelectionMode() : Property(
  299.         "SelectionMode",
  300.         "Property to get/set the selection mode setting of the list.  Value is the text of one of the SelectionMode enumerated value names.",
  301.         "RowSingle")
  302.     {}
  303.  
  304.     String    get(const PropertyReceiver* receiver) const;
  305.     void    set(PropertyReceiver* receiver, const String& value);
  306. };
  307.  
  308.  
  309. /*!
  310. \brief
  311.     Property to access a column.
  312.  
  313.     \par Usage:
  314.         - Name: ColumnHeader
  315.         - Format: "text:[caption] width:[float] id:[uint]"
  316.  
  317.     \par where:
  318.         - [caption] is the column header caption text.
  319.         - [float] is the width of the column.
  320.         - [uint] is the unique ID for the column.
  321. */
  322. class ColumnHeader : public Property
  323. {
  324. public:
  325.     ColumnHeader() : Property(
  326.         "ColumnHeader",
  327.         "Property to set up a column (there is no getter for this property)",
  328.         "", false)
  329.     {}
  330.  
  331.     String    get(const PropertyReceiver* receiver) const;
  332.     void    set(PropertyReceiver* receiver, const String& value);
  333. };
  334.  
  335. /*!
  336. \brief
  337.     Property to access the number of rows in the list (read-only)
  338.  
  339.     \par Usage:
  340.         - Name: RowCount
  341.         - Format: "" (property is read-only).
  342. */
  343. class RowCount : public Property
  344. {
  345. public:
  346.     RowCount() : Property(
  347.         "RowCount",
  348.         "Property to access the number of rows in the list (read only)",
  349.         "", false)
  350.     {}
  351.  
  352.     String    get(const PropertyReceiver* receiver) const;
  353.     void    set(PropertyReceiver* receiver, const String& value);
  354. };
  355.  
  356.  
  357. } // End of  MultiColumnListProperties namespace section
  358.  
  359. } // End of  CEGUI namespace section
  360.  
  361.  
  362. #endif    // end of guard _CEGUIMultiColumnListProperties_h_
  363.